Class DeviceImpl

java.lang.Object
com.cisco.pt.ipc.impl.IPCObjectImpl
com.cisco.pt.ipc.sim.impl.DeviceImpl
All Implemented Interfaces:
IPCObject, Device
Direct Known Subclasses:
CiscoDeviceImpl, CloudImpl, IoeImpl, MCUImpl, PcImpl, RemoteNetworkImpl

public class DeviceImpl extends IPCObjectImpl implements Device
Information provided by the PKI file:

    \class Device
    
    \brief Device is the base class for all device objects.
    
    \example network().getDevice("Router0")
    
Author:
Auto-generated
  • Constructor Details

  • Method Details

    • setName

      public void setName(String name)
      Information provided by the PKI file:
      
          \brief Sets the display name of this device.
          
          \param name, the display name string.
          
              
      Specified by:
      setName in interface Device
      Parameters:
      name - Takes in a parameter of name
    • getName

      public String getName()
      Information provided by the PKI file:
      
          \brief Returns the display name of this device.
          
          \return QString, the display name of this device.
          
              
      Specified by:
      getName in interface Device
      Returns:
      String Returns a String
    • setPower

      public void setPower(boolean bOn)
      Information provided by the PKI file:
      
          \brief Sets the power on or off.
          
          \param bOn, true to set the power on, false to set the power off.
          
              
      Specified by:
      setPower in interface Device
      Parameters:
      bOn - Takes in a parameter of bOn
    • addSound

      public void addSound(String soundPath, String soundID)
      Information provided by the PKI file:
      
          \brief Adds sound to the device
          
          \param soundPath, the path to the sound file
          
          \param soundId, the id to identify the sound from other sounds
          
              
      Specified by:
      addSound in interface Device
      Parameters:
      soundPath - Takes in a parameter of soundPath
      soundID - Takes in a parameter of soundID
    • playSound

      public void playSound(String soundID, int numLoop)
      Information provided by the PKI file:
      
          \brief Play sound to the device
          
          \param soundID, the id of the sounpath to the sound file
          
          \param numLoop, the number of times to play the sound
          
              
      Specified by:
      playSound in interface Device
      Parameters:
      soundID - Takes in a parameter of soundID
      numLoop - Takes in a parameter of numLoop
    • stopSound

      public void stopSound(String soundID)
      Information provided by the PKI file:
      
          \brief Stop playing sound on the device
          
          \param soundID, the id of the sounpath to the sound file
          
              
      Specified by:
      stopSound in interface Device
      Parameters:
      soundID - Takes in a parameter of soundID
    • stopSounds

      public void stopSounds()
      Information provided by the PKI file:
      
          \brief Stops playing all sounds on the device
          
              
      Specified by:
      stopSounds in interface Device
    • destroySounds

      public void destroySounds()
      Information provided by the PKI file:
      
          \brief Destroy all of the sounds on the device
          
              
      Specified by:
      destroySounds in interface Device
    • getPower

      public boolean getPower()
      Information provided by the PKI file:
      
          \brief Returns the current power state of this device.
          
          \return bool, true if the power is on, otherwise false.
          
              
      Specified by:
      getPower in interface Device
      Returns:
      boolean Returns a boolean
    • getXCoordinate

      public double getXCoordinate()
      Information provided by the PKI file:
      
          \brief Returns the current x-coordinate position in the Logical workspace for this device.
          
          \return double, the current x-coordinate.
          
              
      Specified by:
      getXCoordinate in interface Device
      Returns:
      double Returns a double
    • getYCoordinate

      public double getYCoordinate()
      Information provided by the PKI file:
      
          \brief Returns the current y-coordinate position in the Logical workspace for this device.
          
          \return double, the current y-coordinate.
          
              
      Specified by:
      getYCoordinate in interface Device
      Returns:
      double Returns a double
    • getCenterXCoordinate

      public double getCenterXCoordinate()
      Information provided by the PKI file:
      
          \brief Returns the current x-coordinate position in the Logical workspace for this device.
          
          \return double, the current x-coordinate.
          
              
      Specified by:
      getCenterXCoordinate in interface Device
      Returns:
      double Returns a double
    • getCenterYCoordinate

      public double getCenterYCoordinate()
      Information provided by the PKI file:
      
          \brief Returns the current y-coordinate position in the Logical workspace for this device.
          
          \return double, the current y-coordinate.
          
              
      Specified by:
      getCenterYCoordinate in interface Device
      Returns:
      double Returns a double
    • getAreaTopY

      public double getAreaTopY()
      Information provided by the PKI file:
      
          \brief Returns the current topmost y-coordinate position in the for this device.
          
          \return double, the current y-coordinate.
          
              
      Specified by:
      getAreaTopY in interface Device
      Returns:
      double Returns a double
    • getAreaLeftX

      public double getAreaLeftX()
      Information provided by the PKI file:
      
          \brief Returns the current leftmost x-coordinate position in the for this device.
          
          \return double, the current x-coordinate.
          
              
      Specified by:
      getAreaLeftX in interface Device
      Returns:
      double Returns a double
    • moveToLocationCentered

      public boolean moveToLocationCentered(int x, int y)
      Information provided by the PKI file:
      
          \brief Moves this device to the specified location for its center in Logical workspace.
          
          \param x, the new x-coordinate position.
          \param y, the new y-coordinate position.
          
          \return bool, true if successful, otherwise false.
          
              
      Specified by:
      moveToLocationCentered in interface Device
      Parameters:
      x - Takes in a parameter of x
      y - Takes in a parameter of y
      Returns:
      boolean Returns a boolean
    • moveToLocation

      public boolean moveToLocation(int x, int y)
      Information provided by the PKI file:
      
          \brief Moves this device to the specified location in Logical workspace.
          
          \param x, the new x-coordinate position.
          \param y, the new y-coordinate position.
          
          \return bool, true if successful, otherwise false.
          
              
      Specified by:
      moveToLocation in interface Device
      Parameters:
      x - Takes in a parameter of x
      y - Takes in a parameter of y
      Returns:
      boolean Returns a boolean
    • getXPhysicalWS

      public int getXPhysicalWS()
      Information provided by the PKI file:
      
          \brief Returns the current x-coordinate position in the Physical workspace for this device.
          
          \return int, the current x-cordinate.
          
              
      Specified by:
      getXPhysicalWS in interface Device
      Returns:
      int Returns a int
    • getYPhysicalWS

      public int getYPhysicalWS()
      Information provided by the PKI file:
      
          \brief Returns the current y-coordinate position in the Physical workspace for this device.
          
          \return int, the current y-coordinate.
          
              
      Specified by:
      getYPhysicalWS in interface Device
      Returns:
      int Returns a int
    • getGlobalXPhysicalWS

      public double getGlobalXPhysicalWS()
      Information provided by the PKI file:
      
          \brief Returns the current global x-coordinate position in the Physical workspace for this device.
          
          \return double, the current global x-cordinate.
          
              
      Specified by:
      getGlobalXPhysicalWS in interface Device
      Returns:
      double Returns a double
    • getGlobalYPhysicalWS

      public double getGlobalYPhysicalWS()
      Information provided by the PKI file:
      
          \brief Returns the current global y-coordinate position in the Physical workspace for this device.
          
          \return double, the current global y-coordinate.
          
              
      Specified by:
      getGlobalYPhysicalWS in interface Device
      Returns:
      double Returns a double
    • moveToLocInPhysicalWS

      public boolean moveToLocInPhysicalWS(int x, int y)
      Information provided by the PKI file:
      
          \brief Moves this device to the specified location in Physical workspace.
          
          \param x, the new x-coordinate position.
          \param y, the new y-coordinate position.
          
          \return bool, true if successful, otherwise false.
          
              
      Specified by:
      moveToLocInPhysicalWS in interface Device
      Parameters:
      x - Takes in a parameter of x
      y - Takes in a parameter of y
      Returns:
      boolean Returns a boolean
    • moveByInPhysicalWS

      public boolean moveByInPhysicalWS(int x, int y)
      Information provided by the PKI file:
      
          \brief Moves this device by the specified amount in Physical workspace.
          
          \param x, the x-amount to move by.
          \param y, the y-amount to move by.
          
          \return bool, true if successful, otherwise false.
          
              
      Specified by:
      moveByInPhysicalWS in interface Device
      Parameters:
      x - Takes in a parameter of x
      y - Takes in a parameter of y
      Returns:
      boolean Returns a boolean
    • getType

      public DeviceType getType()
      Information provided by the PKI file:
      
          \brief Returns the type of this device.
          
          \return DeviceType, the type of this device.
          Device types:       eRouter = 0,
          eSwitch = 1,
          eCloud = 2,
          eBridge = 3,
          eHub = 4,
          eRepeater = 5,
          eCoAxialSplitter = 6,
          eAccessPoint = 7,
          ePc = 8,
          eServer = 9,
          ePrinter = 10,
          eWirelessRouter = 11,
          eIpPhone = 12,
          eDslModem = 13,
          eCableModem = 14,
          eRemoteNetwork = 15,
          eMultiLayerSwitch = 16,
          eSwitch3650 = 17,
          eLaptop = 18,
          eTabletPC = 19,
          ePda = 20,
          eWirelessEndDevice = 21,
          eWiredEndDevice = 22,
          eTV = 23,
          eHomeVoip = 24,
          eAnalogPhone = 25,
          eMultiUser = 26,
          eASA = 27,
          eIoE = 28,
          eHomeGateway = 29,
          eWirelessRouterNewGeneration = 30,
          eCellTower = 31,
          eCentralOfficeServer = 32,
          eCiscoAccessPoint = 33,
          eEmbeddedCiscoAccessPoint = 34,
          eSniffer = 35,
          eMCU = 36,
          eSBC = 37,
          eThing = 38,
          eMCUComponent = 39,
          eEmbeddedServer = 40,
          eWirelessLanController = 41,
          eCluster = 42,
          eGeoIcon = 43,
          eLightWeightAccessPoint = 44,
          ePowerDistributionDevice = 45,
          ePatchPanel = 46,
          eWallMount = 47,
          eSecurityAppliance = 48,
          eMerakiServer = 49
          
              
      Specified by:
      getType in interface Device
      Returns:
      DeviceType Returns a DeviceType
    • getModel

      public String getModel()
      Information provided by the PKI file:
      
          \brief Returns the model of this device.
          
          \return string, the model of this device.
          
              
      Specified by:
      getModel in interface Device
      Returns:
      String Returns a String
    • getDescriptor

      public DeviceDescriptor getDescriptor()
      Information provided by the PKI file:
      
          \brief Returns the device descriptor that user can get information on the device like type, model, module supported..
          
          \return DeviceDescriptor, DeviceDescriptor object
          
              
      Specified by:
      getDescriptor in interface Device
      Returns:
      DeviceDescriptor Returns a DeviceDescriptor
    • getSerialNumber

      public String getSerialNumber()
      Information provided by the PKI file:
      
          \brief Returns the device serial number.
          
          \return string, device serial number in string format
          
              
      Specified by:
      getSerialNumber in interface Device
      Returns:
      String Returns a String
    • getPort

      public Port getPort(String portName)
      Information provided by the PKI file:
      
          \brief Returns the Port object with the specified port name.
          
          \param portName,    portName can be one of the following plus a port number where appropriate:
          Console, Aux, Ethernet, FastEthernet, GigabitEthernet,
          Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async.
          Example: FastEthernet0/0
          
          \return Port, the Port object associated with the port name.
          
              
      Specified by:
      getPort in interface Device
      Parameters:
      portName - Takes in a parameter of portName
      Returns:
      Port Returns a Port
    • getPortCount

      public int getPortCount()
      Information provided by the PKI file:
      
          \brief Returns the number of ports in this device.
          
          \return int, the number of ports in this device.
          
              
      Specified by:
      getPortCount in interface Device
      Returns:
      int Returns a int
    • getPortAt

      public Port getPortAt(int index)
      Information provided by the PKI file:
      
          \brief Returns the Port object at the specified index.
          
          \param int index, the index of the port of interest.
          
          \return Port, the Port object at the specified index.
          
              
      Specified by:
      getPortAt in interface Device
      Parameters:
      index - Takes in a parameter of index
      Returns:
      Port Returns a Port
    • getProcess

      public Process getProcess(String process)
      Information provided by the PKI file:
      
          \brief Returns the Process object associated the process name.
          
          \param process, the name of the process.
          Valid process names. Not all names have an interface to interact with. Only get names for which there are interfaces.
          The word "Process" is optional and may be appended to the end or ommitted.:
          Aaa, AcsServer, RadiusClient, RadiusServer, TacacsClient, TacacsServer, Acl, Aclv6, PingTcp, Settings,
          AnalogPhoneHandler, AnalogPhone, ArpLookUp, Arp, AsaAcl, AsaAclv6, Firewall, Firewallv6, AsaNat, AsaNatv6,
          Bgp, BluetoothManager, CustomBluetooth, Bridge, BVIManager, CapwapAC, Capwap, Cbac, Cbacv6, Cdp,
          CellularClientManager, CellularClient, Cellular, COPapChapAuthenticator, ParserViewManager,
          PrivilegeManager, PortMapped, DhcpClient, DhcpRelayAgent, DhcpServerMain, DhcpServer,
          DhcpSnoopingBindingDBAgent, DhcpSnooping, Dhcpv6Client, Dhcpv6Main, Dhcpv6ServerMain, Dhcpv6Server,
          DnsClient, DnsResolver, DnsServer, Dtp, EigrpMain, Eigrp, Eigrpv6Main, Eigrpv6, EtherChannel,
          EtherChannelDispatcher, EtherChannelManager, Lacp, Pagp, CsmaCd, Dot1QEncap, Dot1QSubIntDispatcher,
          EthernetEncap, FileManager, DlciLookUp, FrameRelayMain, FrameRelay, FRSubIntDispatcher, InvArp,
          LmiSignaling, FtpClient, FtpServer, Gre, TunnelInterface, Hdlc, Hsrp, Hsrpv6, HttpBackgroundClient,
          HttpBackgroundClientManager, HttpClient, HttpProxy, HttpServer, HttpsServer, IoxServer, WebSocketClient,
          Wlc2504HttpsServer, Wlc2504Server, Icmp, Ping, TraceRoute, Icmpv6, CustomIO, IoeClient, IoEComponent,
          Ioe, IoeServer, IoeUserManager, IoxGuestOs, UserApp, UserJsApp, UserPyApp, HostIp, IpFragmentation,
          Ips, HostIpv6, Ipv6Fragmentation, PMTUDiscovery, Ipv6Ip, IsatapClient, L2Nat,
          LinksysRouterEventHandler, Lldp, Loopback, LoopbackManager, EmailClient, EmailServer, Nat, NatV6, Nd,
          NeighborLookUp, Netflow, Netflowv6, NFCollector, NFExporter, NtpClient, NtpServer, OspfMain, Ospf,
          Ospfv3Main, Ospfv3, Pop3Client, Pop3Server, InterfaceStatus, PortKeepAlive, Chap, PAP, PhoneSignaling,
          PppMain, Ppp, DialerInterface, DialerInterfaceManager, PppoeClient, PppoeClientManager, Pppoe,
          PppoeServer, VirtualAccessInterface, VirtualTemplateInterface, VirtualTemplateManager, PTP, Rep,
          CableSignaling, CloudSwitcher, DslSignaling, Forwarding, LoopBreaker, PatchWire, Repeater, Rip,
          Ripv6Main, Ripv6, IpUnnumberDispatcher, PortDispatcher, Routing, RoutingProtocol, RoutingProcessv6,
          Security, SmtpClient, SmtpServer, SnmpAgent, SnmpManager, SshClient, SshServer, StpMain, Stp,
          MacSwitcher, PortSecurity, SdmManager, Span, SpanDest, SpanDestLocalPort, SpanSource,
          SpanSourceLocalPort, SpanSourceLocalPortChannel, SpanSourceLocalVlan, VlanManager, WLCMacSwitcher,
          SyslogClient, SyslogServer, CustomTcp, Tcp, TcpUserTraffic, ReverseTelnet, TelnetClient,
          TelnetServer, TftpClient, TftpServer, TftpSession, TftpSessionManager, Tv, CustomUdp, Udp,
          UdpTraceRoute, UsbController, CME, H323Client, H323, H323Server, PhoneMedia, Rtp, SccpClient,
          SccpServer, VoiceSwitcher, Ah, EasyVpnClient, EasyVpnServer, Esp, Ike, Ipsec, Vtp,
          AccessPointSwitcher, CsmaCa, LWAccessPointSwitcher, LWWirelessServer, WEP, WirelessClient,
          WirelessCommon, WirelessEncap, WirelessServerManager, WirelessServer, WLCServer, WPA, Zfw, Zfwv6
          
          \return Process, the Process object associated with the process name.
          
              
      Specified by:
      getProcess in interface Device
      Parameters:
      process - Takes in a parameter of process
      Returns:
      Process Returns a Process
    • getUsbPortCount

      public int getUsbPortCount()
      Information provided by the PKI file:
      
          \brief Return the number of usb port
          
          \return int, number of usb port
          
              
      Specified by:
      getUsbPortCount in interface Device
      Returns:
      int Returns a int
    • getUsbPortAt

      public UsbPort getUsbPortAt(int index)
      Information provided by the PKI file:
      
          \brief Returns the usb port at a specified index
          
          \return int, index of the usb port
          
              
      Specified by:
      getUsbPortAt in interface Device
      Parameters:
      index - Takes in a parameter of index
      Returns:
      UsbPort Returns a UsbPort
    • getRootModule

      public Module getRootModule()
      Information provided by the PKI file:
      
          \brief Returns the root module of the device.
          
          \return Module, The root module object.
          
              
      Specified by:
      getRootModule in interface Device
      Returns:
      Module Returns a Module
    • addModule

      public boolean addModule(String slot, ModuleType type, String model)
      Information provided by the PKI file:
      
          \brief Adds a specific module to a particular slot.
          
          \param slot, the slot to add the module to.
          \param type,        the type of the module.
          Module types:       eLineCard = 0,
          eNetworkModule = 1,
          eInterfaceCard = 2,
          ePtRouterModule = 3,
          ePtSwitchModule = 4,
          ePtCloudModule = 5,
          ePtRepeaterModule = 6,
          ePtHostModule = 7,
          ePtModemModule = 8,
          ePtLaptopModule = 9,
          ePtTVModule = 10,
          eIpPhonePowerAdapter = 11,
          ePtTabletPCModule = 12,
          ePtPdaModule = 13,
          ePtWirelessEndDeviceModule = 14,
          ePtWiredEndDeviceModule = 15,
          eTrs35 = 16,
          eUsb = 17,
          eNonRemovableModule = 18,
          eASAPowerAdapter = 19
          \param model, the model name of the module.
          
          \return bool, true if successful, otherwise false.
          
              
      Specified by:
      addModule in interface Device
      Parameters:
      slot - Takes in a parameter of slot
      type - Takes in a parameter of type
      model - Takes in a parameter of model
      Returns:
      boolean Returns a boolean
    • removeModule

      public boolean removeModule(String slot)
      Information provided by the PKI file:
      
          \brief Removes the module from the slot.
          
          \param slot, the slot to remove the module from.
          
          \return bool, true if successful, otherwise false.
          
              
      Specified by:
      removeModule in interface Device
      Parameters:
      slot - Takes in a parameter of slot
      Returns:
      boolean Returns a boolean
    • getCommandLine

      public TerminalLine getCommandLine()
      Information provided by the PKI file:
      
          \brief Returns the command line TerminalLine object.
          
          \return TerminalLine, the TerminalLine object.
          
              
      Specified by:
      getCommandLine in interface Device
      Returns:
      TerminalLine Returns a TerminalLine
    • addCustomVar

      public void addCustomVar(String name, String var)
      Information provided by the PKI file:
      
          \brief Adds a custom variable.
          
          \param name, the name of the variable.
          \param var, the value of the variable.
          
              
      Specified by:
      addCustomVar in interface Device
      Parameters:
      name - Takes in a parameter of name
      var - Takes in a parameter of var
    • removeCustomVar

      public boolean removeCustomVar(String name)
      Information provided by the PKI file:
      
          \brief Removes a custom variable.
          
          \param name, the name of the variable.
          
          \return bool, true if successful, otherwise, false.
          
              
      Specified by:
      removeCustomVar in interface Device
      Parameters:
      name - Takes in a parameter of name
      Returns:
      boolean Returns a boolean
    • hasCustomVar

      public boolean hasCustomVar(String name)
      Information provided by the PKI file:
      
          \brief Returns true if this device has a custom variable with the specified name.
          
          \param name, the name of the variable of interest.
          
          \param var, true if this device has a custom variable with the specified name.
          
              
      Specified by:
      hasCustomVar in interface Device
      Parameters:
      name - Takes in a parameter of name
      Returns:
      boolean Returns a boolean
    • getCustomVarStr

      public String getCustomVarStr(String name)
      Information provided by the PKI file:
      
          \brief Returns the value of the variable with the specified name.
          
          \param name, the name of the variable of interest.
          
          \param QString, the value of the custom variable.
          
              
      Specified by:
      getCustomVarStr in interface Device
      Parameters:
      name - Takes in a parameter of name
      Returns:
      String Returns a String
    • getCustomVarsCount

      public int getCustomVarsCount()
      Information provided by the PKI file:
      
          \brief Returns the number of custom variables this device has.
          
          \param QString, the number of custom variables this device has.
          
              
      Specified by:
      getCustomVarsCount in interface Device
      Returns:
      int Returns a int
    • getCustomVarNameAt

      public String getCustomVarNameAt(int index)
      Information provided by the PKI file:
      
          \brief Returns the name of the custom variable at the specified index.
          
          \param index, the index of the variable of interest.
          
          \param QString, the name of the custom variable at the specified index.
          
              
      Specified by:
      getCustomVarNameAt in interface Device
      Parameters:
      index - Takes in a parameter of index
      Returns:
      String Returns a String
    • getCustomVarValueStrAt

      public String getCustomVarValueStrAt(int index)
      Information provided by the PKI file:
      
          \brief Returns the value of the custom variable at the specified index.
          
          \param index, the index of the variable of interest.
          
          \param QString, the value of the custom variable at the specified index.
          
              
      Specified by:
      getCustomVarValueStrAt in interface Device
      Parameters:
      index - Takes in a parameter of index
      Returns:
      String Returns a String
    • setCustomInterface

      public void setCustomInterface(String inf)
      Information provided by the PKI file:
      
          \brief Set custom interface to the device
          
          \param QString, the custom interface name
          
              
      Specified by:
      setCustomInterface in interface Device
      Parameters:
      inf - Takes in a parameter of inf
    • getCustomInterface

      public String getCustomInterface()
      Information provided by the PKI file:
      
          \brief Get custom interface name on the device
          
          \return QString, the custom interface name
          
              
      Specified by:
      getCustomInterface in interface Device
      Returns:
      String Returns a String
    • serializeToXml

      public String serializeToXml()
      Information provided by the PKI file:
      
          \brief Returns the serialization string of this device.
          
          \param QString, the serialization string of this device.
          
              
      Specified by:
      serializeToXml in interface Device
      Returns:
      String Returns a String
    • activityTreeToXml

      public String activityTreeToXml()
      Information provided by the PKI file:
      
          \brief Returns the serialization string of this device's activity tree.
          
          \param QString, the serialization string of this device activity tree.
          
              
      Specified by:
      activityTreeToXml in interface Device
      Returns:
      String Returns a String
    • getPhysicalObject

      public PhysicalObject getPhysicalObject()
      Information provided by the PKI file:
      
          \brief Get custom interface name on the device
          
          \return QString, the custom interface name
          
              
      Specified by:
      getPhysicalObject in interface Device
      Returns:
      PhysicalObject Returns a PhysicalObject
    • getCustomLogicalImage

      public String getCustomLogicalImage()
      Information provided by the PKI file:
      
          \brief Get custom logical image path
          
          \return QString, the custom logical image name
          
              
      Specified by:
      getCustomLogicalImage in interface Device
      Returns:
      String Returns a String
    • setCustomLogicalImage

      public void setCustomLogicalImage(String strPath)
      Information provided by the PKI file:
      
          \brief Set custom logical image path
          
          \param strPath, the path to the custom logical image
          
              
      Specified by:
      setCustomLogicalImage in interface Device
      Parameters:
      strPath - Takes in a parameter of strPath
    • getCustomPhysicalImage

      public String getCustomPhysicalImage()
      Information provided by the PKI file:
      
          \brief Get custom physical image path
          
          \return QString, custom physical image name in string
          
              
      Specified by:
      getCustomPhysicalImage in interface Device
      Returns:
      String Returns a String
    • setCustomPhysicalImage

      public void setCustomPhysicalImage(String strPath)
      Information provided by the PKI file:
      
          \brief Set custom physical image path
          
          \param strPath, custom physical image name in string
          
              
      Specified by:
      setCustomPhysicalImage in interface Device
      Parameters:
      strPath - Takes in a parameter of strPath
    • getSupportedModule

      public List<String> getSupportedModule()
      Information provided by the PKI file:
      
          \brief Get a vector of supported modules
          
          \return vector<string>, a vector of supported module info with id and image path name in string format
          
              
      Specified by:
      getSupportedModule in interface Device
      Returns:
      List<String> Returns a List<String>
    • setTime

      public void setTime(int uiHour, int uiMin, int uiSec, int uiDay, int uiMonth, int uiYear)
      Information provided by the PKI file:
      
          \brief Set time to the device
          
          \param iuHour, hour in integer
          
          \param uiMin, minute in integer
          
          \param uiSec, second in integer
          
          \param uiDay, day in integer
          
          \param uiMonth, month in integer
          
          \param uiYear, year in integer
          
              
      Specified by:
      setTime in interface Device
      Parameters:
      uiHour - Takes in a parameter of uiHour
      uiMin - Takes in a parameter of uiMin
      uiSec - Takes in a parameter of uiSec
      uiDay - Takes in a parameter of uiDay
      uiMonth - Takes in a parameter of uiMonth
      uiYear - Takes in a parameter of uiYear
    • getUpTime

      public long getUpTime()
      Information provided by the PKI file:
      
          \brief Set time to the device
          
          \return vector<string>, vector of port names in string format
          
              
      Specified by:
      getUpTime in interface Device
      Returns:
      long Returns a long
    • getPorts

      public List<String> getPorts()
      Information provided by the PKI file:
      
          \brief Set time to the device
          
          \return vector<string>, vector of port names in string format
          
              
      Specified by:
      getPorts in interface Device
      Returns:
      List<String> Returns a List<String>
    • getDeviceExternalAttributeValue

      public double getDeviceExternalAttributeValue(String attribute)
      Information provided by the PKI file:
      
          \brief Get device external attribute value
          
          \return double, attribute value
          
              
      Specified by:
      getDeviceExternalAttributeValue in interface Device
      Parameters:
      attribute - Takes in a parameter of attribute
      Returns:
      double Returns a double
    • setDeviceExternalAttributes

      public void setDeviceExternalAttributes(String attributeValues)
      Information provided by the PKI file:
      
          \brief Set device external attribute value
          
          \param attributeValues, QString attribute value pair in json format
          
              
      Specified by:
      setDeviceExternalAttributes in interface Device
      Parameters:
      attributeValues - Takes in a parameter of attributeValues
    • addDeviceExternalAttributes

      public void addDeviceExternalAttributes(String attributeValues)
      Information provided by the PKI file:
      
          \brief Add device external attribute value
          
          \param attributeValues, QString attribute value pair in json format
          
              
      Specified by:
      addDeviceExternalAttributes in interface Device
      Parameters:
      attributeValues - Takes in a parameter of attributeValues
    • subtractDeviceExternalAttributes

      public void subtractDeviceExternalAttributes(String attributeValues)
      Information provided by the PKI file:
      
          \brief Remove some of the device external attribute value pairs from the current list
          
          \param attributeValues, QString attribute value pair in json format
          
              
      Specified by:
      subtractDeviceExternalAttributes in interface Device
      Parameters:
      attributeValues - Takes in a parameter of attributeValues
    • getDeviceExternalAttributes

      public String getDeviceExternalAttributes()
      Information provided by the PKI file:
      
          \brief Returns the list of external attributes and associated values
          
          \param QString, attribute value pair in json format
          
              
      Specified by:
      getDeviceExternalAttributes in interface Device
      Returns:
      String Returns a String
    • clearDeviceExternalAttributes

      public void clearDeviceExternalAttributes()
      Specified by:
      clearDeviceExternalAttributes in interface Device
    • isOutdated

      public boolean isOutdated()
      Information provided by the PKI file:
      
          \brief Determine if the IoE device is outdated and needs to be updated.
          
              
      Specified by:
      isOutdated in interface Device
      Returns:
      boolean Returns a boolean
    • restoreToDefault

      public boolean restoreToDefault(boolean bMakeCopy, boolean bMarkCustomizedUpdated)
      Information provided by the PKI file:
      
          \brief Restores all workspace devices to the default programming stored in the PTD file.
          \param bMakeCopy, also make a copy of the user?s device in the workspace
          \param bMarkCustomizedUpdate, if the user?s device was changed, update it and set it as updated
          
              
      Specified by:
      restoreToDefault in interface Device
      Parameters:
      bMakeCopy - Takes in a parameter of bMakeCopy
      bMarkCustomizedUpdated - Takes in a parameter of bMarkCustomizedUpdated
      Returns:
      boolean Returns a boolean
    • updateTemplateCreationTime

      public void updateTemplateCreationTime()
      Information provided by the PKI file:
      
          \brief The template creation time determines if a device in the workspace needs to be updated. This function
          Updates the template creation time to match the template PTD
          
              
      Specified by:
      updateTemplateCreationTime in interface Device
    • runProject

      public boolean runProject(String projectName, String extraCode)
      Information provided by the PKI file:
      
          \brief Runs a programming project in the mcu.
          
          \param projectName, The name of the project to run.  Something like "Blink (JavaScript)"
          \param extraCode, does nothing.
          
          \return bool, value is true if the project existed and was started, false if not.
          
              
      Specified by:
      runProject in interface Device
      Parameters:
      projectName - Takes in a parameter of projectName
      extraCode - Takes in a parameter of extraCode
      Returns:
      boolean Returns a boolean
    • stopProject

      public boolean stopProject(String projectName)
      Information provided by the PKI file:
      
          \brief Stops a programming project in the mcu.
          
          \param projectName, The name of the project to stop.  Something like "Blink (JavaScript)"
          
          \return bool, value is true if the project was found and stopped, false if not.
          
              
      Specified by:
      stopProject in interface Device
      Parameters:
      projectName - Takes in a parameter of projectName
      Returns:
      boolean Returns a boolean
    • isProjectRunning

      public boolean isProjectRunning(String projectName)
      Information provided by the PKI file:
      
          \brief Checks if a programming project with the given name is running.
          
          \param projectName, The name of the project to check is running.  Something like "Blink (JavaScript)"
          
          \return bool, value is true if the project was found running, false if not.
          
              
      Specified by:
      isProjectRunning in interface Device
      Parameters:
      projectName - Takes in a parameter of projectName
      Returns:
      boolean Returns a boolean
    • runCodeInProject

      public boolean runCodeInProject(String projectName, String code)
      Information provided by the PKI file:
      
          \brief Runs additional code in the given project.
          
          \param projectName, The name of the project to run additional code in.  Something like "Blink (JavaScript)"
          \param code, the code to run.  If you were writing javascript you could output text like this.  "Serial.println('testing output')"
          
          \return bool, value is true if the project was found and the code was run, false if not.
          
              
      Specified by:
      runCodeInProject in interface Device
      Parameters:
      projectName - Takes in a parameter of projectName
      code - Takes in a parameter of code
      Returns:
      boolean Returns a boolean
    • addProgrammingSerialOutputs

      public void addProgrammingSerialOutputs(String output)
      Information provided by the PKI file:
      
          \brief Writes to the programming output.  Text appears in the programming output dialog.
          
          \param output, text to write.
          
              
      Specified by:
      addProgrammingSerialOutputs in interface Device
      Parameters:
      output - Takes in a parameter of output
    • getProgrammingSerialOutputs

      public String getProgrammingSerialOutputs()
      Information provided by the PKI file:
      
          \brief Gets the programming output.  It is the text that appears in the programming output dialog.
          
          \return string, value is the text that appears in the programming output dialog.
          
              
      Specified by:
      getProgrammingSerialOutputs in interface Device
      Returns:
      String Returns a String
    • clearProgrammingSerialOutputs

      public void clearProgrammingSerialOutputs()
      Information provided by the PKI file:
      
          \brief Clears the programming output dialog.
          
              
      Specified by:
      clearProgrammingSerialOutputs in interface Device
    • addUserDesktopApp

      public UserDesktopAppConfig addUserDesktopApp(String dirName)
      Specified by:
      addUserDesktopApp in interface Device
      Parameters:
      dirName - Takes in a parameter of dirName
      Returns:
      UserDesktopAppConfig Returns a UserDesktopAppConfig
    • addUserDesktopAppFromGlobal

      public UserDesktopAppConfig addUserDesktopAppFromGlobal(String id)
      Specified by:
      addUserDesktopAppFromGlobal in interface Device
      Parameters:
      id - Takes in a parameter of id
      Returns:
      UserDesktopAppConfig Returns a UserDesktopAppConfig
    • getUserDesktopAppCount

      public int getUserDesktopAppCount()
      Specified by:
      getUserDesktopAppCount in interface Device
      Returns:
      int Returns a int
    • getUserDesktopAppAt

      public UserDesktopAppConfig getUserDesktopAppAt(int index)
      Specified by:
      getUserDesktopAppAt in interface Device
      Parameters:
      index - Takes in a parameter of index
      Returns:
      UserDesktopAppConfig Returns a UserDesktopAppConfig
    • getUserDesktopAppByDir

      public UserDesktopAppConfig getUserDesktopAppByDir(String dirName)
      Specified by:
      getUserDesktopAppByDir in interface Device
      Parameters:
      dirName - Takes in a parameter of dirName
      Returns:
      UserDesktopAppConfig Returns a UserDesktopAppConfig
    • getUserDesktopAppById

      public UserDesktopAppConfig getUserDesktopAppById(String id)
      Specified by:
      getUserDesktopAppById in interface Device
      Parameters:
      id - Takes in a parameter of id
      Returns:
      UserDesktopAppConfig Returns a UserDesktopAppConfig
    • removeUserDesktopApp

      public void removeUserDesktopApp(String dirName)
      Specified by:
      removeUserDesktopApp in interface Device
      Parameters:
      dirName - Takes in a parameter of dirName
    • relinkUserDesktopApp

      public void relinkUserDesktopApp(String oldDirName, String newDirName)
      Specified by:
      relinkUserDesktopApp in interface Device
      Parameters:
      oldDirName - Takes in a parameter of oldDirName
      newDirName - Takes in a parameter of newDirName
    • isDesktopAvailable

      public boolean isDesktopAvailable()
      Specified by:
      isDesktopAvailable in interface Device
      Returns:
      boolean Returns a boolean